package org.shangma.exercise;

/**
 * @classname:demo06
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/24 19:06
 * @version: 0.1
 * @since:1.8
 */
public class demo06 {
    public static void main(String[] args) {
//5.变量a和b的值互换  例如：int a = 10,b=20;  结果：a=20,b=10;
        int a = 10;
        int b = 20;
        System.out.println("互换前a:"+a+"\tb:"+b);
        int temp = a;
        a = b;
        b = temp;
        System.out.println("互换前a:"+a+"\tb:"+b);
    }
}
